home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d880.lha
/
Oberon
/
O3Demo2.lzh
/
Definitions
/
Dos.def
< prev
next >
Wrap
Text File
|
1993-01-15
|
30KB
|
1,021 lines
DEFINITION Dos;
IMPORT
e := Exec,
t := Timer,
u := Utility;
CONST
dosName = "dos.library";
DOSTRUE = -1;
DOSFALSE = 0;
oldFile = 1005;
newFile = 1006;
readWrite = 1004;
beginning = -1;
current = 0;
end = 1;
bitsPerByte = 8;
bytesPerLong = 4;
bitsPerLong = 32;
maxInt = 7FFFFFFFH;
minInt = 80000000H;
sharedLock = -2;
accessRead = -2;
exclusiveLock = -1;
accessWrite = -1;
TYPE
DatePtr = UNTRACED POINTER TO Date;
FileInfoBlockPtr = UNTRACED POINTER TO FileInfoBlock;
InfoDataPtr = UNTRACED POINTER TO InfoData;
DateTimePtr = UNTRACED POINTER TO DateTime;
AnchorPathPtr = UNTRACED POINTER TO AnchorPath;
AChainPtr = UNTRACED POINTER TO AChain;
ProcessPtr = UNTRACED POINTER TO Process;
DosPacketPtr = UNTRACED POINTER TO DosPacket;
StandardPacketPtr = UNTRACED POINTER TO StandardPacket;
ErrorStringPtr = UNTRACED POINTER TO ErrorString;
DosLibraryPtr = UNTRACED POINTER TO DosLibrary;
RootNodePtr = UNTRACED POINTER TO RootNode;
CliProcListPtr = UNTRACED POINTER TO CliProcList;
AssignListPtr = UNTRACED POINTER TO AssignList;
DevProcPtr = UNTRACED POINTER TO DevProc;
ExAllDataPtr = UNTRACED POINTER TO ExAllData;
ExAllControlPtr = UNTRACED POINTER TO ExAllControl;
DeviceNodePtr = UNTRACED POINTER TO DeviceNode;
NotifyMessagePtr = UNTRACED POINTER TO NotifyMessage;
NotifyRequestPtr = UNTRACED POINTER TO NotifyRequest;
CSourcePtr = UNTRACED POINTER TO CSource;
RDArgsPtr = UNTRACED POINTER TO RDArgs;
RecordLockPtr = UNTRACED POINTER TO RecordLock;
LocalVarPtr = UNTRACED POINTER TO LocalVar;
DeviceListAPtr = UNTRACED POINTER TO DeviceList;
SegmentPtr = UNTRACED POINTER TO Segment;
DosListNodePtr = UNTRACED POINTER TO DosListNode;
CommandLineInterfaceAPtr = UNTRACED POINTER TO CommandLineInterface;
FileLockPtr = BPOINTER TO FileLock;
FileHandlePtr = BPOINTER TO FileHandle;
DosEnvecPtr = BPOINTER TO DosEnvec;
DeviceListPtr = BPOINTER TO DeviceList;
DevInfoPtr = BPOINTER TO DevInfo;
DosListPtr = BPOINTER TO DosList;
CommandLineInterfacePtr = BPOINTER TO CommandLineInterface;
TaskArrayPtr = BPOINTER TO TaskArray;
DosInfoPtr = BPOINTER TO DosInfo;
FileSysStartupMsgPtr = BPOINTER TO FileSysStartupMsg;
PathLockPtr = BPOINTER TO PathLock;
Date = STRUCT
days : LONGINT;
minute : LONGINT;
tick : LONGINT;
END;
CONST
ticksPerSecond = 50;
TYPE
FileInfoBlock = STRUCT
diskKey : LONGINT;
dirEntryType : LONGINT;
fileName : ARRAY 108 OF CHAR;
protection : LONGSET;
entryType : LONGINT;
size : LONGINT;
numBlock : LONGINT;
date : Date;
comment : ARRAY 80 OF CHAR;
reserved : ARRAY 36 OF CHAR;
END;
CONST
script = 6;
pure = 5;
archive = 4;
readProt = 3;
writeProt = 2;
execute = 1;
delete = 0;
faultMax = 82;
TYPE
BPTR = e.BPTR;
BSTR = BPOINTER TO e.STRING;
TYPE
InfoData = STRUCT
numSoftErrors : LONGINT;
unitNumber : LONGINT;
diskState : LONGINT;
numBlock : LONGINT;
numBlockUsed : LONGINT;
bytesPerBlock : LONGINT;
diskType : LONGINT;
volumeNode : DeviceListPtr;
inUse : LONGINT;
END;
CONST
writeProtect = 80;
validating = 81;
validated = 82;
noDiskPresent = -1;
unreadableDisk = sys.VAL(LONGINT, 'BAD\o');
dosDisk = sys.VAL(LONGINT, 'DOS\o');
ffsDisk = sys.VAL(LONGINT, 'DOS\x01');
notReallyDos = sys.VAL(LONGINT, 'NDOS');
kickStartDisk = sys.VAL(LONGINT, 'KICK');
msdosDisk = sys.VAL(LONGINT, 'MSD\o');
noFreeStore = 103;
taskTableFull = 105;
badTemplate = 114;
badNumber = 115;
requiredArgMissing = 116;
keyNeedsArg = 117;
tooManyArgs = 118;
unmatchedQuotes = 119;
lineTooLong = 120;
fileNotObject = 121;
invalidResidentLibrary = 122;
noDefaultDir = 201;
objectInUse = 202;
objectExists = 203;
dirNotFound = 204;
objectNotFound = 205;
badStreamName = 206;
objectTooLarge = 207;
actionNotKnown = 209;
invalidComponentName = 210;
invalidLock = 211;
objectWrongType = 212;
diskNotValidated = 213;
diskWriteProtected = 214;
renameAcrossDevices = 215;
directoryNotEmpty = 216;
tooManyLevels = 217;
deviceNotMounted = 218;
seekError = 219;
commentTooBig = 220;
diskFull = 221;
deleteProtected = 222;
writeProtected = 223;
readProtected = 224;
notADosDisk = 225;
noDisk = 226;
noMoreEntries = 232;
isSoftLink = 233;
objectLinked = 234;
badHunk = 235;
notImplemented = 236;
recordNotLocked = 240;
lockCollision = 241;
lockTimeOut = 242;
unLockError = 243;
ok = 0;
warn = 5;
error = 10;
fail = 20;
ctrlC = 12;
ctrlD = 13;
ctrlE = 14;
ctrlF = 15;
same = 0;
sameHandler = 1;
different = -1;
changeLock = 0;
changeFH = 1;
hard = 0;
soft = 1;
equal = -2;
itemError = -1;
nothing = 0;
unQuoted = 1;
quoted = 2;
fileHandle = 0;
exAllControl = 1;
fib = 2;
stdpkt = 3;
cli = 4;
rdArgs = 5;
CONST
lenDatString = 16;
TYPE
DatString = ARRAY 16 OF CHAR;
DatStringPtr = UNTRACED POINTER TO DatString;
DateTime = STRUCT (stamp : Date)
format : SHORTINT;
flags : SHORTSET;
strDay : DatStringPtr;
strDate : DatStringPtr;
strTime : DatStringPtr;
END;
CONST
subst = 0;
future = 1;
formatDos = 0;
formatInt = 1;
formatUSA = 2;
formatCDN = 3;
formatMax = formatCDN;
TYPE
AnchorPath = STRUCT
base : AChainPtr;
last : AChainPtr;
breakBits : LONGSET;
foundBreak : LONGSET;
flags : SHORTSET;
reserved : e.BYTE;
strLen : INTEGER;
info : FileInfoBlock;
buf : e.STRING;
END;
CONST
doWild = 0;
itsWild = 1;
doDir = 2;
didDir = 3;
noMemErr = 4;
doDot = 5;
dirChanged = 6;
TYPE
AChain = STRUCT
child : AChainPtr;
parent : AChainPtr;
lock : FileLockPtr;
info : FileInfoBlock;
flags : SHORTSET;
string : e.STRING;
END;
CONST
patternBit = 0;
examinedBit = 1;
completed = 2;
allBit = 3;
single = 4;
pAny = 80H;
pSingle = 81H;
pOrStart = 82H;
pOrNext = 83H;
pOrEnd = 84H;
pNot = 85H;
pNotEnd = 86H;
pNotClass = 87H;
pClass = 88H;
pRepBeg = 89H;
pRepEnd = 8AH;
pStop = 8BH;
complexBit = 1;
examineBit = 2;
bufferOverflow = 303;
break = 304;
notExecutable = 305;
TYPE
ProcessId = e.MsgPortPtr;
Process = STRUCT (task : e.Task)
msgPort : e.MsgPort;
pad : INTEGER;
segList : e.BPTR;
stackSize : LONGINT;
globVec : e.APTR;
taskNum : LONGINT;
stackBase : e.BPTR;
result2 : LONGINT;
currentDir : FileLockPtr;
cis : FileHandlePtr;
cos : FileHandlePtr;
consoleTask : ProcessId;
fileSystemTask : ProcessId;
cli : CommandLineInterfacePtr;
returnAddr : e.APTR;
pktWait : e.APTR;
windowPtr : e.APTR;
homeDir : FileLockPtr;
flags : LONGSET;
exitCode : e.PROC;
exitData : LONGINT;
arguments : e.STRPTR;
localVars : e.MinList;
shellPrivate : LONGINT;
ces : FileHandlePtr;
END;
CONST
freeSegList = 0;
freeCurrDir = 1;
freeCLI = 2;
closeInput = 3;
closeOutput = 4;
freeArgs = 5;
TYPE
FileHandle = STRUCT
link : e.MessagePtr;
port : e.MsgPortPtr;
type : ProcessId;
buf : LONGINT;
pos : LONGINT;
end : LONGINT;
func1 : LONGINT;
func2 : LONGINT;
func3 : LONGINT;
arg1 : LONGINT;
arg2 : LONGINT;
END;
DosPacket = STRUCT
link : e.MessagePtr;
port : e.MsgPortPtr;
type : LONGINT;
res1 : LONGINT;
res2 : LONGINT;
arg1 : LONGINT;
arg2 : LONGINT;
arg3 : LONGINT;
arg4 : LONGINT;
arg5 : LONGINT;
arg6 : LONGINT;
arg7 : LONGINT;
END;
StandardPacket = STRUCT (msg : e.Message)
pkt : DosPacket;
END;
CONST
nil = 0;
startup = 0;
getBlock = 2;
setMap = 4;
die = 5;
event = 6;
currentVolume = 7;
locateObject = 8;
renameDisk = 9;
write = ORD('W');
read = ORD('R');
freeLock = 15;
deleteObject = 16;
renameObject = 17;
moreCache = 18;
copyDir = 19;
waitChar = 20;
setProtect = 21;
createDir = 22;
examineObject = 23;
examineNext = 24;
diskInfo = 25;
info = 26;
flush = 27;
setComment = 28;
parent = 29;
timer = 30;
inhibit = 31;
diskType = 32;
diskChange = 33;
setDate = 34;
screenMode = 994;
readReturn = 1001;
writeReturn = 1002;
seek = 1008;
findUpdate = 1004;
findInput = 1005;
findOutput = 1006;
actionEnd = 1007;
setFileSize = 1022;
writeprotect = 1023;
sameLock = 40;
changeSignal = 995;
format = 1020;
makeLink = 1021;
readLink = 1024;
fhFromLock = 1026;
isFileSystem = 1027;
changeMode = 1028;
copyDirFH = 1030;
parentFH = 1031;
examineAll = 1033;
examineFH = 1034;
lockRecord = 2008;
freeRecord = 2009;
addNotify = 4097;
removeNotify = 4098;
TYPE
ErrorString = STRUCT
nums : e.APTR;
strings : e.APTR;
END;
DosLibrary = STRUCT (lib : e.Library)
root : RootNodePtr;
gv : e.APTR;
a2 : LONGINT;
a5 : LONGINT;
a6 : LONGINT;
errors : ErrorStringPtr;
timeReq : t.TimeRequestPtr;
utilityBase : e.LibraryPtr;
END;
TaskArray = STRUCT
maxCLI : LONGINT;
cli : ARRAY 10000000H OF ProcessId;
END;
RootNode = STRUCT
taskArray : TaskArrayPtr;
consoleSegment : e.BPTR;
time : Date;
restartSeg : e.BPTR;
info : DosInfoPtr;
fileHandlerSegment : e.BPTR;
cliList : e.MinList;
bootProc : ProcessId;
shellSegment : e.BPTR;
flags : LONGSET;
END;
CONST
wildStar = 24;
private1 = 1;
TYPE
CliProcList = STRUCT (node : e.MinNode)
first : LONGINT;
array : UNTRACED POINTER TO ARRAY 1FFFFFFFH OF ProcessId;
END;
DosInfo = STRUCT
mcName : BSTR;
devInfo : DevInfoPtr;
devices : e.BPTR;
handlers : e.BPTR;
nethand : ProcessId;
devLock : e.SignalSemaphore;
entryLock : e.SignalSemaphore;
deleteLock : e.SignalSemaphore;
END;
Segment = STRUCT
next : e.BPTR;
uc : LONGINT;
seg : e.BPTR;
name : ARRAY 4 OF CHAR;
END;
CONST
cmdSystem = -1;
cmdInternal = -2;
cmdDisabled = -999;
TYPE
PathLock = STRUCT
next : PathLockPtr;
lock : FileLockPtr;
END;
CommandLineInterface = STRUCT
result2 : LONGINT;
setName : BSTR;
commandDir : PathLockPtr;
returnCode : LONGINT;
commandName : BSTR;
failLevel : LONGINT;
prompt : BSTR;
standardInput : FileHandlePtr;
currentInput : FileHandlePtr;
commandFile : BSTR;
interactive : LONGINT;
background : LONGINT;
currentOutput : FileHandlePtr;
defaultStack : LONGINT;
standardOutput : FileHandlePtr;
module : e.BPTR;
END;
DosListNode = STRUCT
END;
DeviceList = STRUCT
next : DeviceListPtr;
type : LONGINT;
task : ProcessId;
lock : FileLockPtr;
volumeDate : Date;
lockList : FileLockPtr;
diskType : LONGINT;
unused : LONGINT;
name : BSTR;
END;
DevInfo = STRUCT
next : DevInfoPtr;
type : LONGINT;
task : ProcessId;
lock : FileLockPtr;
handler : BSTR;
stackSize : LONGINT;
priority : LONGINT;
startup : FileSysStartupMsgPtr;
segList : e.BPTR;
globVec : e.BPTR;
name : BSTR;
END;
DosList = STRUCT
next : DevInfoPtr;
type : LONGINT;
task : ProcessId;
lock : FileLockPtr;
assignName : e.STRPTR;
list : AssignListPtr;
unused : ARRAY 4 OF LONGINT;
name : BSTR;
END;
AssignList = STRUCT
next : AssignListPtr;
lock : FileLockPtr;
END;
CONST
device = 0;
directory = 1;
volume = 2;
late = 3;
nonBinding = 4;
private = -1;
TYPE
DevProc = STRUCT
port : e.MsgPortPtr;
lock : FileLockPtr;
flags : LONGSET;
devNode : DosListNodePtr;
END;
CONST
unLock = 0;
assign = 1;
devices = 2;
volumes = 3;
assigns = 4;
entry = 5;
ldDelete = 6;
dosListRead = 0;
dosListWrite = 1;
all = LONGSET{devices, volumes, assigns};
TYPE
FileLock = STRUCT
link : FileLockPtr;
key : LONGINT;
access : LONGINT;
task : ProcessId;
volume : DeviceListPtr;
END;
CONST
reportStream = 0;
reportTask = 1;
reportLock = 2;
reportVolume = 3;
reportInsert = 4;
diskError = 296;
abortBusy = 288;
runExecute = -1;
runSystem = -2;
runSystemAsynch = -3;
root = 1;
userDir = 2;
softLink = 3;
linkDir = 4;
file = -3;
linkFile = -4;
hunkUnit = 999;
hunkName = 1000;
hunkCode = 1001;
hunkData = 1002;
hunkBSS = 1003;
hunkReloc32 = 1004;
hunkReloc16 = 1005;
hunkReloc8 = 1006;
hunkExt = 1007;
hunkSymbol = 1008;
hunkDebug = 1009;
hunkEnd = 1010;
hunkHeader = 1011;
hunkOverlay = 1013;
hunkBreak = 1014;
hunkDRel32 = 1015;
hunkDRel16 = 1016;
hunkDRel8 = 1017;
hunkLib = 1018;
hunkIndex = 1019;
extSymb = 0;
extDef = 1;
extAbs = 2;
extRes = 3;
extRef32 = 129;
extCommon = 130;
extRef16 = 131;
extRef8 = 132;
extDExt32 = 133;
extDExt16 = 134;
extDExt8 = 135;
sysDummy = u.user + 32;
sysInput = sysDummy + 1;
sysOutput = sysDummy + 2;
sysAsynch = sysDummy + 3;
sysUserShell = sysDummy + 4;
sysCustomShell = sysDummy + 5;
npDummy = u.user + 1000;
npSeglist = npDummy + 1;
npFreeSeglist = npDummy + 2;
npEntry = npDummy + 3;
npInput = npDummy + 4;
npOutput = npDummy + 5;
npCloseInput = npDummy + 6;
npCloseOutput = npDummy + 7;
npError = npDummy + 8;
npCloseError = npDummy + 9;
npCurrentDir = npDummy + 10;
npStackSize = npDummy + 11;
npName = npDummy + 12;
npPriority = npDummy + 13;
npConsoleTask = npDummy + 14;
npWindowPtr = npDummy + 15;
npHomeDir = npDummy + 16;
npCopyVars = npDummy + 17;
npCli = npDummy + 18;
npPath = npDummy + 19;
npCommandName = npDummy + 20;
npArguments = npDummy + 21;
npNotifyOnDeath = npDummy + 22;
npSynchronous = npDummy + 23;
npExitCode = npDummy + 24;
npExitData = npDummy + 25;
adoDummy = u.user + 2000;
adoFHMode = adoDummy + 1;
adoDirLen = adoDummy + 2;
adoCommNameLen = adoDummy + 3;
adoCommFileLen = adoDummy + 4;
adoPromptLen = adoDummy + 5;
name = 1;
type = 2;
size = 3;
protection = 4;
date = 5;
comment = 6;
TYPE
ExAllData = STRUCT
next : ExAllDataPtr;
name : e.STRPTR;
type : LONGINT;
size : LONGINT;
prot : LONGSET;
days : LONGINT;
mins : LONGINT;
ticks : LONGINT;
comment : e.STRPTR;
END;
ExAllControl = STRUCT
entries : LONGINT;
lastKey : LONGINT;
matchString : e.STRPTR;
matchFunc : u.HookPtr;
END;
DosEnvec = STRUCT
tableSize : LONGINT;
sizeBlock : LONGINT;
secOrg : LONGINT;
surfaces : LONGINT;
sectorPerBlock : LONGINT;
blocksPerTrack : LONGINT;
reserved : LONGINT;
preAlloc : LONGINT;
interleave : LONGINT;
lowCyl : LONGINT;
highCyl : LONGINT;
numBuffers : LONGINT;
bufMemType : LONGINT;
maxTransfer : LONGINT;
mask : LONGSET;
bootPri : LONGINT;
dosType : LONGINT;
baud : LONGINT;
control : LONGINT;
bootBlocks : LONGINT;
END;
CONST
tableSize = 0;
sizeBlock = 1;
secOrg = 2;
numHeads = 3;
secsPerBlk = 4;
blksPerTrack = 5;
reservedBlks = 6;
preFac = 7;
interLeave = 8;
lowCyl = 9;
upperCyl = 10;
numBuffers = 11;
memBufType = 12;
bufMemType = 12;
maxTransfer = 13;
mask = 14;
bootPri = 15;
dosType = 16;
baud = 17;
control = 18;
bootBlocks = 19;
TYPE
FileSysStartupMsg = STRUCT
unit : LONGINT;
device : BSTR;
environ : DosEnvecPtr;
flags : LONGSET;
END;
DeviceNode = STRUCT
next : DeviceNodePtr;
type : LONGINT;
task : ProcessId;
lock : FileLockPtr;
handler : BSTR;
stackSize : LONGINT;
priority : LONGINT;
startup : FileSysStartupMsgPtr;
segList : e.BPTR;
globalVec : e.BPTR;
name : BSTR;
END;
CONST
class = 40000000H;
code = 1234H;
TYPE
NotifyMessage = STRUCT (execMessage : e.Message)
class : LONGINT;
code : INTEGER;
nReq : NotifyRequestPtr;
END;
NotifyRequest = STRUCT
name : e.STRPTR;
fullName : e.STRPTR;
userData : LONGINT;
flags : LONGSET;
task : e.TaskPtr;
signalNum : SHORTINT;
reserved : ARRAY 4 OF LONGINT;
msgCount : LONGINT;
handler : e.MsgPortPtr;
END;
CONST
sendMessage = 0;
sendSignal = 1;
waitReply = 3;
notifyInitial = 4;
magic = 31;
handlerFlags = LONGSET{16.GSET..31};
TYPE
CSource = STRUCT
buffer : UNTRACED POINTER TO ARRAY 1FFFFFFFH OF CHAR;
length : LONGINT;
curChr : LONGINT;
END;
RDArgs = STRUCT
source : CSource;
daList : LONGINT;
buffer : e.STRPTR;
bufSiz : LONGINT;
extHelp : e.STRPTR;
flags : LONGSET;
END;
CONST
stdIn = 0;
noAlloc = 1;
noPrompt = 2;
maxTemplateItems = 100;
maxMultiArgs = 128;
recExclusive = 0;
recExclusiveImmed = 1;
recShared = 2;
recSharedImmed = 3;
TYPE
RecordLock = STRUCT
fh : FileHandlePtr;
offset : LONGINT;
lenght : LONGINT;
mode : LONGINT;
END;
CONST
bufLine = 0;
bufFull = 1;
bufNone = 2;
TYPE
LocalVar = STRUCT (node : e.Node)
flags : SET;
value : e.STRPTR;
len : LONGINT;
END;
CONST
var = 0;
alias = 1;
ingnore = -80H;
globalOnly = 8;
localOnly = 9;
binaryVar = 10;
VAR
dos : DosLibraryPtr;
PROCEDURE Open(name: ARRAY OF CHAR; accessMode: LONGINT): FileHandlePtr;
PROCEDURE Close(file: FileHandlePtr): BOOLEAN;
PROCEDURE OldClose(file: FileHandlePtr);
PROCEDURE Read(file: FileHandlePtr; buffer: ARRAY OF sys.BYTE; length: LONGINT): LONGINT;
PROCEDURE Write(file: FileHandlePtr; buffer: ARRAY OF sys.BYTE; length: LONGINT): LONGINT;
PROCEDURE Input(): FileHandlePtr;
PROCEDURE Output(): FileHandlePtr;
PROCEDURE Seek(file: FileHandlePtr; position: LONGINT; offset: LONGINT): LONGINT;
PROCEDURE DeleteFile(name: ARRAY OF CHAR): BOOLEAN;
PROCEDURE Rename(oldName: ARRAY OF CHAR; newName: ARRAY OF CHAR): BOOLEAN;
PROCEDURE Lock(name: ARRAY OF CHAR; type: LONGINT): FileLockPtr;
PROCEDURE UnLock(lock: FileLockPtr);
PROCEDURE DupLock(lock: FileLockPtr): FileLockPtr;
PROCEDURE Examine(lock: FileLockPtr; VAR info: FileInfoBlock): BOOLEAN;
PROCEDURE ExNext(lock: FileLockPtr; VAR info: FileInfoBlock): BOOLEAN;
PROCEDURE Info(lock: FileLockPtr; VAR info: InfoData): BOOLEAN;
PROCEDURE CreateDir(name: ARRAY OF CHAR): FileLockPtr;
PROCEDURE CurrentDir(lock: FileLockPtr): FileLockPtr;
PROCEDURE IoErr(): LONGINT;
PROCEDURE CreateProc(name: ARRAY OF CHAR; pri: LONGINT; segList: e.BPTR; stackSize: LONGINT): ProcessId;
PROCEDURE Exit(returnCode: LONGINT);
PROCEDURE LoadSeg(name: ARRAY OF CHAR): e.BPTR;
PROCEDURE UnLoadSeg(segList: e.BPTR);
PROCEDURE DeviceProc(name: ARRAY OF CHAR): ProcessId;
PROCEDURE SetComment(name: ARRAY OF CHAR; comment: ARRAY OF CHAR): BOOLEAN;
PROCEDURE SetProtection(name: ARRAY OF CHAR; protect: LONGSET): BOOLEAN;
PROCEDURE DateStamp(VAR date: Date);
PROCEDURE Delay(timeout: LONGINT);
PROCEDURE WaitForChar(file: FileHandlePtr; timeout: LONGINT): BOOLEAN;
PROCEDURE ParentDir(lock: FileLockPtr): FileLockPtr;
PROCEDURE IsInteractive(file: FileHandlePtr): BOOLEAN;
PROCEDURE Execute(string: ARRAY OF CHAR; file: FileHandlePtr; file2: FileHandlePtr): BOOLEAN;
PROCEDURE AllocDosObject(type: LONGINT; tags: ARRAY OF u.TagItem): e.APTR;
PROCEDURE AllocDosObjectTags(type: LONGINT; tag1..: u.Tag): e.APTR;
PROCEDURE FreeDosObject(type: LONGINT; ptr: e.APTR);
PROCEDURE DoPkt0(port: ProcessId; action: LONGINT): LONGINT;
PROCEDURE DoPkt1(port: ProcessId; action: LONGINT; arg1: LONGINT): LONGINT;
PROCEDURE DoPkt2(port: ProcessId; action: LONGINT; arg1: LONGINT; arg2: LONGINT): LONGINT;
PROCEDURE DoPkt3(port: ProcessId; action: LONGINT; arg1: LONGINT; arg2: LONGINT; arg3: LONGINT): LONGINT;
PROCEDURE DoPkt4(port: ProcessId; action: LONGINT; arg1: LONGINT; arg2: LONGINT; arg3: LONGINT; arg4: LONGINT): LONGINT;
PROCEDURE DoPkt(port: ProcessId; action: LONGINT; arg1: LONGINT; arg2: LONGINT; arg3: LONGINT; arg4: LONGINT; arg5: LONGINT): LONGINT;
PROCEDURE SendPkt(VAR dp: DosPacket; port: ProcessId; replyport: e.MsgPortPtr);
PROCEDURE WaitPkt(): DosPacketPtr;
PROCEDURE ReplyPkt(dp: DosPacketPtr; res1: LONGINT; res2: LONGINT);
PROCEDURE AbortPkt(port: ProcessId; pkt: DosPacketPtr);
PROCEDURE LockRecord(fh: FileHandlePtr; offset: LONGINT; length: LONGINT; mode: LONGINT; timeout: LONGINT): BOOLEAN;
PROCEDURE LockRecords(recArray: RecordLockPtr; timeout: LONGINT): BOOLEAN;
PROCEDURE UnLockRecord(fh: FileHandlePtr; offset: LONGINT; length: LONGINT): BOOLEAN;
PROCEDURE UnLockRecords(recArray: RecordLockPtr): BOOLEAN;
PROCEDURE SelectInput(fh: FileHandlePtr): FileHandlePtr;
PROCEDURE SelectOutput(fh: FileHandlePtr): FileHandlePtr;
PROCEDURE FGetC(fh: FileHandlePtr): LONGINT;
PROCEDURE FPutC(fh: FileHandlePtr; ch: LONGINT): LONGINT;
PROCEDURE UnGetC(fh: FileHandlePtr; character: LONGINT): LONGINT;
PROCEDURE FRead(fh: FileHandlePtr; block: ARRAY OF sys.BYTE; blocklen: LONGINT; number: LONGINT): LONGINT;
PROCEDURE FWrite(fh: FileHandlePtr; block: ARRAY OF sys.BYTE; blocklen: LONGINT; number: LONGINT): LONGINT;
PROCEDURE FGets(fh: FileHandlePtr; VAR buf: ARRAY OF CHAR; buflen: LONGINT): e.APTR;
PROCEDURE FPuts(fh: FileHandlePtr; str: ARRAY OF CHAR): BOOLEAN;
PROCEDURE VFWritef(fh: FileHandlePtr; format: ARRAY OF CHAR; argarray: ARRAY OF sys.BYTE): LONGINT;
PROCEDURE FWritef(fh: FileHandlePtr; format: ARRAY OF CHAR; arg1..: e.APTR): LONGINT;
PROCEDURE VFPrintf(fh: FileHandlePtr; format: ARRAY OF CHAR; argarray: ARRAY OF e.APTR): LONGINT;
PROCEDURE FPrintf(fh: FileHandlePtr; format: ARRAY OF CHAR; arg1..: e.APTR): LONGINT;
PROCEDURE Flush(fh: FileHandlePtr);
PROCEDURE SetVBuf(fh: FileHandlePtr; VAR buff: ARRAY OF CHAR; type: LONGINT; size: LONGINT): LONGINT;
PROCEDURE DupLockFromFH(fh: FileHandlePtr): FileLockPtr;
PROCEDURE OpenFromLock(lock: FileLockPtr): FileHandlePtr;
PROCEDURE ParentOfFH(fh: FileHandlePtr): FileLockPtr;
PROCEDURE ExamineFH(fh: FileHandlePtr; VAR fib: FileInfoBlock): BOOLEAN;
PROCEDURE SetFileDate(name: ARRAY OF CHAR; date: Date): BOOLEAN;
PROCEDURE NameFromLock(lock: FileLockPtr; VAR buffer: ARRAY OF CHAR; len: LONGINT): BOOLEAN;
PROCEDURE NameFromFH(fh: FileHandlePtr; VAR buffer: ARRAY OF CHAR; len: LONGINT): BOOLEAN;
PROCEDURE SplitName(name: ARRAY OF CHAR; seperator: CHAR; buf: ARRAY OF CHAR; oldpos: LONGINT; size: LONGINT): INTEGER;
PROCEDURE SameLock(lock1: FileLockPtr; lock2: FileLockPtr): INTEGER;
PROCEDURE SetMode(fh: FileHandlePtr; mode: LONGINT): LONGINT;
PROCEDURE ExAll(lock: FileLockPtr; buffer: ARRAY OF sys.BYTE; size: LONGINT; data: LONGINT; ctrl: ExAllControlPtr): BOOLEAN;
PROCEDURE ReadLink(port: ProcessId; lock: FileLockPtr; path: ARRAY OF CHAR; buffer: ARRAY OF CHAR; size: LONGINT): LONGINT;
PROCEDURE MakeLink(name: ARRAY OF CHAR; dest: LONGINT; soft: LONGINT): LONGINT;
PROCEDURE ChangeMode(type: LONGINT; fh: FileHandlePtr; newmode: LONGINT): BOOLEAN;
PROCEDURE ChangeModeLock(type: LONGINT; lock: FileLockPtr; newmode: LONGINT): BOOLEAN;
PROCEDURE SetFileSize(fh: FileHandlePtr; pos: LONGINT; mode: LONGINT): LONGINT;
PROCEDURE SetIoErr(result: LONGINT): LONGINT;
PROCEDURE Fault(code: LONGINT; header: ARRAY OF CHAR; VAR buffer: ARRAY OF CHAR; len: LONGINT): BOOLEAN;
PROCEDURE PrintFault(code: LONGINT; header: ARRAY OF CHAR): BOOLEAN;
PROCEDURE ErrorReport(code: LONGINT; type: LONGINT; arg1: DeviceListAPtr; device: ProcessId): LONGINT;
PROCEDURE ErrorReportLock(code: LONGINT; type: LONGINT; arg1: FileLockPtr; device: ProcessId): LONGINT;
PROCEDURE ErrorReportFH(code: LONGINT; type: LONGINT; arg1: FileHandlePtr; device: ProcessId): LONGINT;
PROCEDURE Requester(s1: ARRAY OF CHAR; s2: ARRAY OF CHAR; s3: ARRAY OF CHAR; flags: LONGSET): LONGINT;
PROCEDURE Cli(): CommandLineInterfaceAPtr;
PROCEDURE CreateNewProc(tags: ARRAY OF u.TagItem): ProcessPtr;
PROCEDURE CreateNewProcTags(tag1..: u.Tag): ProcessPtr;
PROCEDURE RunCommand(seg: e.BPTR; stack: LONGINT; paramptr: ARRAY OF CHAR; paramlen: LONGINT): LONGINT;
PROCEDURE GetConsoleTask(): ProcessId;
PROCEDURE SetConsoleTask(task: ProcessId): ProcessId;
PROCEDURE GetFileSysTask(): ProcessId;
PROCEDURE SetFileSysTask(task: ProcessId): ProcessId;
PROCEDURE GetArgStr(): e.STRPTR;
PROCEDURE SetArgStr(string: ARRAY OF CHAR): BOOLEAN;
PROCEDURE FindCliProc(num: LONGINT): ProcessPtr;
PROCEDURE MaxCli(): LONGINT;
PROCEDURE SetCurrentDirName(name: ARRAY OF CHAR): BOOLEAN;
PROCEDURE GetCurrentDirName(VAR buf: ARRAY OF CHAR; len: LONGINT): BOOLEAN;
PROCEDURE SetProgramName(name: ARRAY OF CHAR): BOOLEAN;
PROCEDURE GetProgramName(VAR buf: ARRAY OF CHAR; len: LONGINT): BOOLEAN;
PROCEDURE SetPrompt(name: ARRAY OF CHAR): BOOLEAN;
PROCEDURE GetPrompt(VAR buf: ARRAY OF CHAR; len: LONGINT): BOOLEAN;
PROCEDURE SetProgramDir(lock: FileLockPtr): FileLockPtr;
PROCEDURE GetProgramDir(): FileLockPtr;
PROCEDURE System(command: ARRAY OF CHAR; tags: ARRAY OF u.TagItem): LONGINT;
PROCEDURE SystemTags(command: ARRAY OF CHAR; tag1..: u.Tag): LONGINT;
PROCEDURE AssignLock(name: ARRAY OF CHAR; lock: FileLockPtr): BOOLEAN;
PROCEDURE AssignLate(name: ARRAY OF CHAR; path: ARRAY OF CHAR): BOOLEAN;
PROCEDURE AssignPath(name: ARRAY OF CHAR; path: ARRAY OF CHAR): BOOLEAN;
PROCEDURE AssignAdd(name: ARRAY OF CHAR; lock: FileLockPtr): BOOLEAN;
PROCEDURE RemAssignList(name: ARRAY OF CHAR; lock: FileLockPtr): LONGINT;
PROCEDURE GetDeviceProc(name: ARRAY OF CHAR; dp: DevProcPtr): DevProcPtr;
PROCEDURE FreeDeviceProc(dp: DevProcPtr);
PROCEDURE LockDosList(flags: LONGSET): DosListNodePtr;
PROCEDURE UnLockDosList(flags: LONGSET);
PROCEDURE AttemptLockDosList(flags: LONGSET): DosListNodePtr;
PROCEDURE RemDosEntry(dlist: DosListNodePtr): BOOLEAN;
PROCEDURE AddDosEntry(dlist: DosListNodePtr): DosListNodePtr;
PROCEDURE FindDosEntry(dlist: DosListNodePtr; name: ARRAY OF CHAR; flags: LONGSET): DosListNodePtr;
PROCEDURE NextDosEntry(dlist: DosListNodePtr; flags: LONGSET): DosListNodePtr;
PROCEDURE MakeDosEntry(name: ARRAY OF CHAR; type: LONGINT): DosListNodePtr;
PROCEDURE FreeDosEntry(dlist: DosListNodePtr);
PROCEDURE IsFileSystem(name: ARRAY OF CHAR): BOOLEAN;
PROCEDURE Format(filesystem: ARRAY OF CHAR; volumename: ARRAY OF CHAR; dostype: LONGINT): BOOLEAN;
PROCEDURE Relabel(drive: ARRAY OF CHAR; newname: ARRAY OF CHAR): BOOLEAN;
PROCEDURE Inhibit(name: ARRAY OF CHAR; onoff: LONGINT): BOOLEAN;
PROCEDURE AddBuffers(name: ARRAY OF CHAR; number: LONGINT): LONGINT;
PROCEDURE CompareDates(date1: Date; date2: Date): LONGINT;
PROCEDURE DateToStr(VAR dt: DateTime): BOOLEAN;
PROCEDURE StrToDate(VAR dt: DateTime): BOOLEAN;
PROCEDURE InternalLoadSeg(fh: FileHandlePtr; table: e.BPTR; funcarray: e.APTR; VAR stack: LONGINT): e.BPTR;
PROCEDURE InternalUnLoadSeg(seglist: e.BPTR; freefunc: e.PROC);
PROCEDURE NewLoadSeg(file: ARRAY OF CHAR; tags: ARRAY OF u.TagItem): e.BPTR;
PROCEDURE NewLoadSegTags(file: ARRAY OF CHAR; tags..: u.Tag): e.BPTR;
PROCEDURE AddSegment(name: ARRAY OF CHAR; seg: e.BPTR; system: LONGINT): BOOLEAN;
PROCEDURE FindSegment(name: ARRAY OF CHAR; seg: SegmentPtr; system: LONGINT): SegmentPtr;
PROCEDURE RemSegment(seg: SegmentPtr): BOOLEAN;
PROCEDURE CheckSignal(mask: LONGSET): LONGSET;
PROCEDURE ReadArgs(template: ARRAY OF CHAR; VAR array: ARRAY OF sys.BYTE; args: RDArgsPtr): RDArgsPtr;
PROCEDURE FindArg(keyword: ARRAY OF CHAR; template: ARRAY OF CHAR): LONGINT;
PROCEDURE ReadItem(VAR name: ARRAY OF CHAR; maxchars: LONGINT; cSrc: CSourcePtr): LONGINT;
PROCEDURE StrToLong(string: ARRAY OF CHAR; VAR value: LONGINT): LONGINT;
PROCEDURE MatchFirst(pat: ARRAY OF CHAR; VAR anchor: AnchorPath): LONGINT;
PROCEDURE MatchNext(VAR anchor: AnchorPath): LONGINT;
PROCEDURE MatchEnd(VAR anchor: AnchorPath);
PROCEDURE ParsePattern(pat: ARRAY OF CHAR; VAR buf: ARRAY OF CHAR; buflen: LONGINT): INTEGER;
PROCEDURE MatchPattern(pat: ARRAY OF CHAR; str: ARRAY OF CHAR): BOOLEAN;
PROCEDURE FreeArgs(args: RDArgsPtr);
PROCEDURE FilePart(path: ARRAY OF CHAR): e.STRPTR;
PROCEDURE PathPart(path: ARRAY OF CHAR): e.APTR;
PROCEDURE AddPart(VAR dir: ARRAY OF CHAR; filename: ARRAY OF CHAR; size: LONGINT): BOOLEAN;
PROCEDURE StartNotify(VAR notify: NotifyRequest): BOOLEAN;
PROCEDURE EndNotify(VAR nofify: NotifyRequest);
PROCEDURE SetVar(name: ARRAY OF CHAR; buffer: ARRAY OF CHAR; size: LONGINT; flags: LONGSET): BOOLEAN;
PROCEDURE GetVar(name: ARRAY OF CHAR; VAR buffer: ARRAY OF CHAR; size: LONGINT; flags: LONGSET): LONGINT;
PROCEDURE DeleteVar(name: ARRAY OF CHAR; flags: LONGSET): BOOLEAN;
PROCEDURE FindVar(name: ARRAY OF CHAR; type: LONGSET): LocalVarPtr;
PROCEDURE CliInit(VAR dp: DosPacket): LONGINT;
PROCEDURE CliInitNewcli(VAR dp: DosPacket): LONGINT;
PROCEDURE CliInitRun(VAR dp: DosPacket): LONGINT;
PROCEDURE WriteChars(buf: ARRAY OF CHAR; buflen: LONGINT): LONGINT;
PROCEDURE PutStr(str: ARRAY OF CHAR): LONGINT;
PROCEDURE VPrintf(format: ARRAY OF CHAR; argarray: ARRAY OF sys.BYTE): LONGINT;
PROCEDURE Printf(format: ARRAY OF CHAR; arg1..: e.APTR): LONGINT;
PROCEDURE PrintF(format: ARRAY OF CHAR; arg1..: e.APTR);
PROCEDURE ParsePatternNoCase(pat: ARRAY OF CHAR; VAR buf: ARRAY OF CHAR; len: LONGINT): INTEGER;
PROCEDURE MatchPatternNoCase(pat: ARRAY OF CHAR; str: ARRAY OF CHAR): BOOLEAN;
PROCEDURE SameDevice(lock1: FileLockPtr; lock2: FileLockPtr): BOOLEAN;
PROCEDURE ReadChar(): CHAR;
PROCEDURE WriteChar(c: CHAR): LONGINT;
PROCEDURE UnReadChar(c: CHAR): LONGINT;
PROCEDURE ReadChars(VAR buf: ARRAY OF sys.BYTE; num: LONGINT): LONGINT;
PROCEDURE ReadLn(VAR buf: ARRAY OF CHAR; len: LONGINT): e.APTR;
PROCEDURE WriteStr(s: ARRAY OF CHAR): BOOLEAN;
PROCEDURE VWritef(format: ARRAY OF CHAR; argv: ARRAY OF sys.BYTE): LONGINT;
PROCEDURE ProcessIdToProcess(id: ProcessId): ProcessPtr;
PROCEDURE ProcessToProcessId(proc: ProcessPtr): ProcessId;
END Dos.